package com.youdianda.vo;

import com.youdianda.entity.SysConfig;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 配置vo
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysConfigVO {
    // 单选多选数据值
    private ConfigValue config_value;

    public SysConfigVO(SysConfig sysConfig) {
        this.id = sysConfig.getId();
        this.group_value = sysConfig.getGroup_value();
        this.tab_value = sysConfig.getTab_value();
        this.attr_key = sysConfig.getAttr_key();
        this.attr_name = sysConfig.getAttr_name();
        this.attr_value = sysConfig.getAttr_value();
        this.del_flag = sysConfig.getDel_flag();
        this.type = sysConfig.getType();
        this.validator = sysConfig.getValidator();
        this.placeholder = sysConfig.getPlaceholder();
        this.can_delete = sysConfig.getCan_delete();
        this.sort_num = sysConfig.getSort_num();
    }

    private Integer id;

    /**
     * 配置名称
     */
    private String group_value;

    /**
     * tab 引入的组件名称
     */
    private String tab_value;

    /**
     * 配置配置键名英文
     */
    private String attr_key;

    /**
     * 配置字段中文名
     */
    private String attr_name;

    /**
     * 配置值内容
     */
    private String attr_value;

    /**
     * 0正常 1 已删除
     */
    private Integer del_flag;

    /**
     * 字段类型，参见字段表
     */
    private Integer type;

    /**
     * 验证规则
     */
    private String validator;

    /**
     * 输入框提示文字
     */
    private String placeholder;

    /**
     * 0 不可删除，1可删除
     */
    private Integer can_delete;

    /**
     * 显示权重，数字大的往后
     */
    private Integer sort_num;
}
